﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web;

namespace Model
{

    [MetadataType(typeof(ExtraWork_Metadata))]
    [DisplayName("考勤设定")]
    public partial class ExtraWork
    {
        public ExtraWork()
        {
            this.Id = Guid.NewGuid();
            this.AddDate = DateTime.Now;
            this.StarDateTime = DateTime.Now;
            this.EndDateTime = DateTime.Now;
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
        }

        public class ExtraWork_Metadata
        {
            [ScaffoldColumn(false)]
            public System.Guid Id { get; set; }

            [ScaffoldColumn(false)]
            public System.Guid UserId { get; set; }

            [DisplayName("添加日期")]
            [ScaffoldColumn(false)]
            public object AddDate { get; set; }

            [DisplayName("主题")]
            public object Title { get; set; }

            [DisplayName("详细")]
            [DataType(DataType.MultilineText)]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Content { get; set; }

            [DisplayName("状态")]
            [ScaffoldColumn(false)]
            public object StateId { get; set; }

            [DisplayName("开始时间")]
            public object StarDateTime { get; set; }

            [DisplayName("结束时间")]
            public object EndDateTime { get; set; }
        }
    }
}
